import os

import requests
from config import Base_url

# 创建接口类
class LoginApi:
    # 初始化
    def __init__(self):
    #     指定url
        self.verify_code_url = Base_url + '/api/captchaImage'
        self.login_url = Base_url + '/api/login'


    # 获取验证码
    def get_verify_code(self):
        return requests.get(self.verify_code_url)


    # 登录

    def login(self,login_data,login_header):
        return requests.post(self.login_url,json=login_data,headers=login_header)

